﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using hospital_registration_system.DAL;
using hospital_registration_system.Entity;

namespace hospital_registration_system.user
{
    public partial class register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            PatientsDao dao = new PatientsDao();
            dao.insert(new Patients(
                    0,//id
                    name.Text,//姓名
                    name.Text,//昵称
                    sex.Text,//性别
                    18,//年龄
                    tel.Text,//电话
                    email.Text,//邮箱
                    address.Text,//地址
                    pwd.Text,//密码
                    name.Text,//创建人
                    new DateTime(),//创建时间
                    name.Text,
                    new DateTime(),
                    0
                )); ;
            Response.Redirect("/user/userLogin.aspx");
        }
    }
}